package com.wang.designpattern.factory.simplefactory.pizzastore.store;

import com.wang.designpattern.factory.simplefactory.pizzastore.pizza.Pizza;

public class StaticPizzaStore {

    public static void main(String[] args) {
        StaticOrderPizza staticOrderPizza = new StaticOrderPizza();
        do {
            Pizza pizza = staticOrderPizza.orderPizza();
            if (null != pizza) {
                pizza.prepare();
                pizza.bake();
                pizza.cut();
                pizza.box();
            } else {
                System.out.println("没有选择的pizza种类，订购失败！");
                break;
            }
        } while (true);
    }

}
